When a software application requires access to a database, the software application may request a connection record to the database from an application server via a database driver. The connection record provides the software application with the information needed to access the database, such as the address of the database and the protocol used to access the database. The application server expends time and computing resources to establish a connection to a database and to create a connection record to the database. To reduce the time needed to provide the application a connection record to the database, the application server may maintain a pool of connection records. The pool may include connection records to more than one database. For example, the pool may include a set of connections associated with several databases.
One problem with using a pool of connection records is that when a database is inaccessible, the set of connection records to the inaccessible database in the connection pool become stale because the connection records may no longer be used to connect to the inaccessible database. One way of handling stale connection records is to purge the set of connection records associated with the inaccessible database from the connection pool and create a new set of connection records to a failover or backup database to the inaccessible database.